// 设计登录时未输入用户名与密码时的报错

// 关闭VSCode非必要报错
// ignore_for_file: camel_case_types, sized_box_for_whitespace

import 'package:flutter/material.dart';
import 'package:project_award_statistics/utils/my_yaru_buttons/my_yaru_button_error_info.dart';
import 'package:yaru/widgets.dart';
import 'package:yaru/yaru.dart';

class DialogLoginErrEmpty_Desktop extends StatelessWidget {
  const DialogLoginErrEmpty_Desktop({super.key});

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      backgroundColor: Theme.of(context).colorScheme.surface,
      titlePadding: EdgeInsets.all(0),
      title: YaruDialogTitleBar(   // 设置对话框最上面登录错误的那一栏样式
        isClosable: false,
        title: Text(
          "登录错误",
          style: TextStyle(
            fontSize: 19,
            fontWeight: FontWeight.bold,
          ),
        ),
      ),
      content: Container(
        height: 140,
        width: 480,
        child: Column(
          children: [
            const SizedBox(height: 20,),
            Text(
              "您未输入您的用户名或密码,请重新检查您的输入!",
              style: TextStyle(
                fontSize: 20,
              ),
            ),
            const SizedBox(height: 45,),
            SizedBox(
              height: 45,
              width: 200,
              child: MyYaruButton_ErrorInfo(
                text: "好的,我马上去检查", 
                onPressed: ()=>Navigator.of(context).pop(),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

/*
return AlertDialog(
      backgroundColor: Theme.of(context).colorScheme.surface,
      content: Container(
        height: 200,
        width: 400,
        child: Column(   // 设置报错文字内容按列式显示
          children: [
            Container(
              decoration: BoxDecoration(
                color:YaruColors.warmGrey,
              ),
              child: Center(
                child: Text(
                  "登录错误",
                  style: TextStyle(
                    fontSize: 25,
                  ),
                ),
              ),
            ),
            SizedBox(height: 35,),   // 设置控件间距离
            Text(
              "您未输入姓名或密码,请重新检查您的输入!",
              style: TextStyle(
                fontSize: 19,
              ),
            ),
            SizedBox(height: 50,),
            Container(
              height: 45,
              width: 200,
              child: MyYaruButton_Normal(
                text: "好的,我马上去检查", 
                onPressed: ()=>Navigator.of(context).pop(),
              ),
            ),
          ],
        ),
      ),
    );
*/